import request from '@/utils/request'

export function saveZpaiban(data) {
  return request({
    url: '/zpaiban/save',
    method: 'post',
    data
  })
}

export function saveZpaibans(data) {
  return request({
    url: '/zpaiban/saves',
    method: 'post',
    data
  })
}

export function updateZpaiban(data) {
  return request({
    url: '/zpaiban/update',
    method: 'put',
    data
  })
}

export function deleteZpaiban(id) {
  return request({
    url: `/zpaiban/delete/${id}`,
    method: 'delete'
  })
}

export function getZpaibanByYearAndWeekNumber(data) {
  return request({
    url: '/zpaiban/search',
    method: 'post',
    data
  })
}

export function addOption(data) {
  return request({
    url: '/zpaiban/option/add',
    method: 'post',
    data
  })
}

export function getOption() {
  return request({
    url: `/zpaiban/option/search`,
    method: 'get'
  })
}

export function deleteOption(id) {
  return request({
    url: `/zpaiban/option/delete/${id}`,
    method: 'delete'
  })
}
